package zheezes.eisp.collect.model.impl.gd;

import org.apache.log4j.Logger;

import zheezes.eisp.collect.model.CollectManager;
import zheezes.eisp.collect.model.CollectTaskHandler;
import zheezes.eisp.data.orm.CollectTask;


public class GdCollectManager extends CollectManager {
	private static Logger logger = Logger.getLogger(GdCollectManager.class);
	
	static {
		logger.debug("loading");
	}

	@Override
	public CollectTaskHandler select(CollectTask task) {
		CollectTaskHandler handler = null;

		switch (task.getType().intValue()) {
		case CollectTask.RM_DAILY_FROZEN_TASK:
			handler = new GdConResMeterDailyFrozenCollectTaskHandler();
			break;
		case CollectTask.VIP_HOUR_FROZEN_TASK:
			handler = new GdVipFrozenCollectTaskHandler();
			break;
		case CollectTask.SM_DAILY_FROZEN_TASK:
			handler = new GdSummatorDailyFrozenCollectTaskHandler();
			break;
		}
		/*
		if(handler != null) {
			handler.setTask(task);
		}
		*/
		return handler;
	}
}
